#ifndef _PROB_SET_H
#define _PROB_SET_H

#include "num/rand.h"
namespace num
{
class	ProbSet
{
public:
	ProbSet(unsigned int	Entries = 100);
	~ProbSet();
	void			SetProbability(unsigned int Entry, float Probability);
	float			GetProbability(unsigned int Entry);

	void			Init(int Entries);
	void			RecalcSet();
	unsigned int	GetWeightedEntry();
	ProbSet*		Clone();
	void			FromSet(ProbSet& Set);
	void			SetRandom(num::RAND32* pRand) { m_pRand = pRand; };
private:
	float			m_Total;
	float*			m_SetA;
	unsigned int	m_Entries;
	num::RAND32*	m_pRand;
};

}	//namespace num

#endif //_PROB_SET_H